package com.bdqn.carrental.dao;

import com.bdqn.carrental.pojo.catinfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CatinfoMapper {
    /**
     * 查询汽车信息
     */
  /*  @Select("SELECT a.chephaoid,a.pinpai, b.chexinname,c.catflname," +
            "a.jiage FROM catinfo AS a ,chexincatinfo AS b," +
            "flcatinfo AS c WHERE a.catflid=c.catflid AND " +
            "b.chexinid=a.chexinid and pinpai LIKE CONCAT('%',#{pinpai},'%') ")*/
    @Select("SELECT * FROM catinfo WHERE pinpai LIKE CONCAT('%',#{pinpai},'%') ")
    @ResultType(catinfo.class)
    List<catinfo> findAllByUserName(@Param("pinpai") String pinpai); //可根据品牌模糊查询

}
